package android.slc.extras.user.entity;

import android.slc.appdb.user.entity.User;
import android.slc.extras.component.tree.entity.SlcTree;

import java.util.List;

import io.objectbox.annotation.Transient;

/**
 * @author slc
 * @date 2021/2/20 16:57
 */
public class UserInfo extends User implements SlcTree {

    /**
     * 部门对象
     */
    private SysDept dept;

    /**
     * 角色对象
     */
    private List<SysRole> roles;
    /**
     * 角色组
     */
    @Transient
    protected Long[] roleIds;

    /**
     * 岗位组
     */
    @Transient
    protected Long[] postIds;
    /**
     * 岗位名称
     */
    private String postNames;

    public SysDept getDept() {
        return dept;
    }

    public void setDept(SysDept dept) {
        this.dept = dept;
    }

    public List<SysRole> getRoles() {
        return roles;
    }

    public void setRoles(List<SysRole> roles) {
        this.roles = roles;
    }

    public Long[] getRoleIds() {
        return roleIds;
    }

    public void setRoleIds(Long[] roleIds) {
        this.roleIds = roleIds;
    }

    public Long[] getPostIds() {
        return postIds;
    }

    public void setPostIds(Long[] postIds) {
        this.postIds = postIds;
    }

    public String getPostNames() {
        return postNames;
    }

    public void setPostNames(String postNames) {
        this.postNames = postNames;
    }
    @Override
    public String getTName() {
        return getNickName();
    }

    @Override
    public String getTDescription() {
        return getNickName();
    }

    @Override
    public String getTId() {
        return getId() + "";
    }

    @Override
    public String getParentTId() {
        return getDeptId() + "";
    }

    @Override
    public int getTType() {
        return SlcTree.VALUE_LEAF;
    }
}
